using System.Collections.Generic;
using System.Threading.Tasks;
using WebServiceTool.Models;

namespace WebServiceTool.Services
{
    /// <summary>
    /// WebService服务接口，定义了WebService调用的基本操作
    /// </summary>
    public interface IWebService
    {
        /// <summary>
        /// 获取WSDL内容
        /// </summary>
        /// <param name="url">WSDL地址</param>
        /// <returns>WSDL内容</returns>
        Task<string> GetWsdlAsync(string url);

        /// <summary>
        /// 解析WSDL内容并提取服务方法
        /// </summary>
        /// <param name="wsdlContent">WSDL内容</param>
        /// <returns>服务方法列表</returns>
        Task<List<WebServiceOperation>> ParseWsdlMethods(string wsdlContent);

        /// <summary>
        /// 调用WebService方法
        /// </summary>
        /// <param name="wsdlContent">WSDL内容</param>
        /// <param name="methodName">方法名</param>
        /// <param name="parameters">参数列表</param>
        /// <returns>调用结果</returns>
        Task<string> InvokeMethodAsync(string wsdlContent, string methodName, List<InputParameter> parameters);
    }

}